package com.concurrency.example.immutable;

import com.google.common.collect.ImmutableMap;

import java.util.Map;

public class ImmutableExample3 {

    private static Map<String, String> map = ImmutableMap.<String,String>builder()
            .put("name","令狐冲").put("age","33").build();



    public static void main(String[] args) {
        map.put("name", "任盈盈");//不允许修改，运行时抛出异常
    }
}
